package com.platform.hjt.erp.model;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * ErpOrderInfoDetailId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class ErpOrderInfoDetailId implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -5512475476367761559L;
	private String erpGoodInfoId;
	private String erpOrderInfoId;

	// Constructors

	/** default constructor */
	public ErpOrderInfoDetailId() {
	}

	/** full constructor */
	public ErpOrderInfoDetailId(String erpGoodInfoId, String erpOrderInfoId) {
		this.erpGoodInfoId = erpGoodInfoId;
		this.erpOrderInfoId = erpOrderInfoId;
	}

	// Property accessors

	@Column(name = "erp_good_info_id", nullable = false, length = 32)
	public String getErpGoodInfoId() {
		return this.erpGoodInfoId;
	}

	public void setErpGoodInfoId(String erpGoodInfoId) {
		this.erpGoodInfoId = erpGoodInfoId;
	}

	@Column(name = "erp_order_info_id", nullable = false, length = 32)
	public String getErpOrderInfoId() {
		return this.erpOrderInfoId;
	}

	public void setErpOrderInfoId(String erpOrderInfoId) {
		this.erpOrderInfoId = erpOrderInfoId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ErpOrderInfoDetailId))
			return false;
		ErpOrderInfoDetailId castOther = (ErpOrderInfoDetailId) other;

		return ((this.getErpGoodInfoId() == castOther.getErpGoodInfoId()) || (this
				.getErpGoodInfoId() != null
				&& castOther.getErpGoodInfoId() != null && this
				.getErpGoodInfoId().equals(castOther.getErpGoodInfoId())))
				&& ((this.getErpOrderInfoId() == castOther.getErpOrderInfoId()) || (this
						.getErpOrderInfoId() != null
						&& castOther.getErpOrderInfoId() != null && this
						.getErpOrderInfoId().equals(
								castOther.getErpOrderInfoId())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getErpGoodInfoId() == null ? 0 : this.getErpGoodInfoId()
						.hashCode());
		result = 37
				* result
				+ (getErpOrderInfoId() == null ? 0 : this.getErpOrderInfoId()
						.hashCode());
		return result;
	}

}